Style sheets are commonly used to define the layout of documents. For instance, a style sheet may specify various parameters and corresponding values that are associated with the layout of a document (or a type of document). For instance, a first style sheet may be associated with business letters, a second style sheet may be associated with personal letters, a third style sheet may be associated with business reports, and so on. Examples of parameters that may be specified by a style sheet include but are not limited to page size, margins, fonts, and how headers and/or links appear in a document.
One exemplary type of style sheet is referred to as a cascading style sheet (CSS). A cascading style sheet defines the layout of a document that is written in a markup language. Examples of a markup language include but are not limited to hypertext markup language (HTML), extensible HTML (XHTML), plain old extensible markup language (PDX), scalable vector graphics (SVG), and XML user interface language (XUL). Cascading style sheets often are used to define presentation semantics (e.g., the look and/or formatting) of web pages.
Modern style sheet editors, including CSS editors, provide features including but not limited to syntax coloring, statement completion, document structure analysis, and validation of a document against standards (e.g., web standards). Such features often are provided in real-time as a user is making edits to the document. It may be desirable for processing (e.g., tokenizing, parsing, etc.) of the style sheet to occur at a relatively rapid pace. However, some types of processing, such as tokenizing and parsing, traditionally are performed with respect to an entire document. Accordingly, conventional techniques for processing a document may consume substantial time and/or resources of a computing system (e.g., a computer). Moreover, conventional techniques may not be capable of tokenizing and/or parsing the document in real-time as a user makes edits to the document, especially when the document includes tens, hundreds, or more kilobytes of data.